<template>

	<view>
		<view class="uni-title uni-common-mt">合作门店</view>
		<block v-for="(item) in storeList">
		<view class="uni-flex uni-row" @click="navTo('/pages/store/details?id=1')">
			<view class="text uni-flex" style="width: 200rpx;height: 220rpx;-webkit-justify-content: center;justify-content: center;-webkit-align-items: center;align-items: center;">
				<image src="../../static/test.jpg" style="width: 150rpx;height: 150rpx;" ></image>
			</view>
			<view class="uni-flex uni-column" style="-webkit-flex: 1;flex: 1;-webkit-justify-content: space-between;justify-content: space-between;">
				<view class="text" style="height: 120rpx;text-align: left;padding-left: 20rpx;padding-top: 10rpx;">
					{{item.storeName}}
				</view>
				<view class="uni-flex uni-row">
					<view class="text" style="-webkit-flex: 1;flex: 1;">{{item.storeAddress}}</view>
					<!-- <view class="text" style="-webkit-flex: 1;flex: 1;">立</view> -->
				</view>
			</view>
		</view>
		</block>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				storeList:[
					{storeId:1,storeName:'威马工厂店',storeAddress:'渝北礼嘉'},
					{storeId:2,storeName:'尊驰汽车维修',storeAddress:'巴南八公里'},
				]
			}
		},
		methods: {
			storeDeilt(e){
				console.log(e)
				uni.navigateTo({
					url: `/pages/details?storeId=e`
				})
			},
			/**
			 * 统一跳转接口,拦截未登录路由
			 * navigator标签现在默认没有转场动画，所以用view
			 */
			navTo(url){
				// if(!this.hasLogin){
				// 	url = '/pages/public/login';
				// }
				uni.navigateTo({  
					url
				})
			},
		}
	}
</script>

<style>
	.flex-item {
		width: 33.3%;
		height: 200rpx;
		text-align: center;
		line-height: 200rpx;
	}

	.flex-item-V {
		width: 100%;
		height: 150rpx;
		text-align: center;
		line-height: 150rpx;
	}

	.text {
		margin: 15rpx 10rpx;
		padding: 0 20rpx;
		background-color: #ebebeb;
		height: 70rpx;
		line-height: 70rpx;
		text-align: center;
		color: #777;
		font-size: 26rpx;
	}

	.desc {
		/* text-indent: 40rpx; */
	}
	.flex-pc {
		display: flex;
		justify-content: center;
	}
</style>
